#include <QtWidgets>
#if _MSC_VER >= 1600					 ///1600为vs2010编译器版本
#pragma execution_character_set("utf-8") ///c++11特性  设置执行编码
#endif
#include "../include/ITPublic.h"
#include "GameCtrl.h"
#include "GameData.h"
#include "YunLai.h"
#define CONVERT_GAMEVAR(type, offset) (type)((ULONG_PTR)GetGameBaseAddr + offset)

#define WM_CGA_BATTLE_NORMALATTACK WM_USER + 10000
#define WM_CGA_BATTLE_SKILLATTACK WM_USER + 10001
#define WM_CGA_BATTLE_GUARD WM_USER + 10002
#define WM_CGA_BATTLE_ESCAPE WM_USER + 10003
#define WM_CGA_BATTLE_USEITEM WM_USER + 10004
#define WM_CGA_BATTLE_PETSKILLATTACK WM_USER + 10005
#define WM_CGA_DROP_ITEM WM_USER + 10006
#define WM_CGA_USE_ITEM WM_USER + 10007
#define WM_CGA_MOVE_ITEM WM_USER + 10008
#define WM_CGA_MOVE_PET WM_USER + 10009
#define WM_CGA_MOVE_GOLD WM_USER + 10010
#define WM_CGA_LOG_BACK WM_USER + 10011
#define WM_CGA_LOG_OUT WM_USER + 10012
#define WM_CGA_GET_MAP_UNITS WM_USER + 10013
#define WM_CGA_GET_PET_INFO WM_USER + 10014
#define WM_CGA_GET_PETS_INFO WM_USER + 10015
#define WM_CGA_GET_SKILL_INFO WM_USER + 10016
#define WM_CGA_GET_SKILLS_INFO WM_USER + 10017
#define WM_CGA_GET_SUBSKILL_INFO WM_USER + 10018
#define WM_CGA_GET_SUBSKILLS_INFO WM_USER + 10019
#define WM_CGA_GET_PLAYER_INFO WM_USER + 10020
#define WM_CGA_GET_ITEM_INFO WM_USER + 10021
#define WM_CGA_GET_ITEMS_INFO WM_USER + 10022
#define WM_CGA_GET_BATTLE_UNIT_INFO WM_USER + 10023
#define WM_CGA_GET_BATTLE_UNITS_INFO WM_USER + 10024
#define WM_CGA_GET_PET_SKILL_INFO WM_USER + 10025
#define WM_CGA_GET_PET_SKILLS_INFO WM_USER + 10026
#define WM_CGA_CLICK_NPC_DIALOG WM_USER + 10027
#define WM_CGA_SELL_NPC_STORE WM_USER + 10028
#define WM_CGA_BUY_NPC_STORE WM_USER + 10029
#define WM_CGA_SAY_WORDS WM_USER + 10030
#define WM_CGA_BATTLE_EXCHANGE_POSITION WM_USER + 10031
#define WM_CGA_BATTLE_CHANGE_PET WM_USER + 10032
#define WM_CGA_START_WORK WM_USER + 10033
#define WM_CGA_IS_MAP_CELL_PASSABLE WM_USER + 10034
#define WM_CGA_FORCE_MOVE WM_USER + 10035
#define WM_CGA_FORCE_MOVE_TO WM_USER + 10036
#define WM_CGA_CRAFT_ITEM WM_USER + 10037
#define WM_CGA_GET_CRAFT_INFO WM_USER + 10038
#define WM_CGA_GET_CRAFTS_INFO WM_USER + 10039
#define WM_CGA_ASSESS_ITEM WM_USER + 10040
#define WM_CGA_GET_BANK_ITEMS_INFO WM_USER + 10041
#define WM_CGA_DO_REQUEST WM_USER + 10042
#define WM_CGA_TRADE_ADD_STUFFS WM_USER + 10043
#define WM_CGA_GET_TEAM_PLAYERS_INFO WM_USER + 10044
#define WM_CGA_FIX_WARP_STUCK WM_USER + 10045
#define WM_CGA_GET_MOVE_HISTORY WM_USER + 10046
#define WM_CGA_ENABLE_FLAGS WM_USER + 10047
#define WM_CGA_PLAYER_MENU_SELECT WM_USER + 10048
#define WM_CGA_UNIT_MENU_SELECT WM_USER + 10049
#define WM_CGA_SET_WINDOW_RESOLUTION WM_USER + 10050
#define WM_CGA_REQUEST_DOWNLOAD_MAP WM_USER + 10051
#define WM_CGA_GET_COLLISION_TABLE_RAW WM_USER + 10052
#define WM_CGA_GET_COLLISION_TABLE WM_USER + 10053
#define WM_CGA_GET_OBJECT_TABLE WM_USER + 10054
#define WM_CGA_GET_TILE_TABLE WM_USER + 10055
#define WM_CGA_GET_MAP_NAME WM_USER + 10056
#define WM_CGA_DROP_PET WM_USER + 10057
#define WM_CGA_CHANGE_PET_STATE WM_USER + 10058
#define WM_CGA_LOGIN_GAME_SERVER WM_USER + 10059
#define WM_CGA_BATTLE_DONOTHING WM_USER + 10060
#define WM_CGA_BATTLE_REBIRTH WM_USER + 10061

#define CGA_PORT_BASE 4396
